import java.awt.event.*;
import java.io.*;
import java.lang.reflect.*;
import java.util.*;
import javax.swing.*;
import javax.swing.event.*;

/**
 * Simple server.
 */
class Simple extends LocalServer {

  /** Shows a pop up of the messsage. */
  private class EchoHandler extends AbstractHandler {

    public String handle(Map<String,String> args) {
      String msg = args.get("msg");
      JOptionPane.showMessageDialog(null,msg);
      return "ok";
    }

    EchoHandler() {
      super("Echo");
    }
  }

  Handler[] getHandlers() {
    return new Handler[] {
      new EchoHandler()
    };
  }

  public static void main(String args[]) {
    new Simple().realMain(args);
  }
  
}
